
STRFTIME(3)		   UNIX Programmer's Manual		   STRFTIME(3)

NNAAMMEE
     ssttrrffttiimmee - format date and time

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
     ##iinncclluuddee <<ttiimmee..hh>>
     ##iinncclluuddee <<ssttrriinngg..hh>>

     _s_i_z_e___t
     ssttrrffttiimmee(_c_h_a_r _*_b_u_f, _s_i_z_e___t _m_a_x_s_i_z_e, _c_o_n_s_t _c_h_a_r _*_f_o_r_m_a_t,
	     _c_o_n_s_t _s_t_r_u_c_t _t_m _*_t_i_m_e_p_t_r)

DDEESSCCRRIIPPTTIIOONN
     The ssttrrffttiimmee() function formats the information from _t_i_m_e_p_t_r into the
     buffer _b_u_f according to the string pointed to by _f_o_r_m_a_t.

     The _f_o_r_m_a_t string consists of zero or more conversion specifications and
     ordinary characters.  All ordinary characters are copied directly into
     the buffer.  A conversion specification consists of a percent sign
     ```%''' and one other character.

     No more than _m_a_x_s_i_z_e characters will be placed into the array.  If the
     total number of resulting characters, including the terminating null
     character, is not more than _m_a_x_s_i_z_e, ssttrrffttiimmee() returns the number of
     characters in the array, not counting the terminating null.  Otherwise,
     zero is returned.

     Each conversion specification is replaced by the characters as follows
     which are then copied into the buffer.

     %%AA    is replaced by national representation of the full weekday name.

     %%aa    is replaced by national representation of the abbreviated weekday
	   name, where the abbreviation is the first three characters.

     %%BB    is replaced by national representation of the full month name.

     %%bb    is replaced by national representation of the abbreviated month
	   name, where the abbreviation is the first three characters.

     %%CC    is replaced by (year / 100) as decimal number; single digits are
	   preceded by a zero.

     %%cc    is replaced by national representation of time and date (the format
	   is similar with produced by asctime(3)).

     %%DD    is equivalent to ``%m/%d/%y''.

     %%dd    is replaced by the day of the month as a decimal number (01-31).

     %%EE**   POSIX locale extensions.  The sequences %Ec %EC %Ex %Ey %EY %Od %Oe
	   %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide
	   alternate representations.

     %%ee    is replaced by the day of month as a decimal number (1-31); single
	   digits are preceded by a blank.

     %%HH    is replaced by the hour (24-hour clock) as a decimal number
	   (00-23).

     %%hh    the same as %b.

     %%II    is replaced by the hour (12-hour clock) as a decimal number
	   (01-12).

     %%jj    is replaced by the day of the year as a decimal number (001-366).

     %%kk    is replaced by the hour (24-hour clock) as a decimal number (0-23);
	   single digits are preceded by a blank.

     %%ll    is replaced by the hour (12-hour clock) as a decimal number (1-12);
	   single digits are preceded by a blank.

     %%MM    is replaced by the minute as a decimal number (00-59).

     %%mm    is replaced by the month as a decimal number (01-12).

     %%nn    is replaced by a newline.

     %%OO**   the same as %E*.

     %%pp    is replaced by national representation of either "ante meridiem" or
	   "post meridiem" as appropriate.

     %%RR    is equivalent to ``%H:%M''.

     %%rr    is equivalent to ``%I:%M:%S %p''.

     %%SS    is replaced by the second as a decimal number (00-60).

     %%ss    is replaced by the number of seconds since the Epoch, UTC (see
	   mktime(3)).

     %%TT    is equivalent to ``%H:%M:%S''.

     %%tt    is replaced by a tab.

     %%UU    is replaced by the week number of the year (Sunday as the first day
	   of the week) as a decimal number (00-53).

     %%uu    is replaced by the weekday (Monday as the first day of the week) as
	   a decimal number (1-7).

     %%VV    is replaced by the week number of the year (the first Monday as the
	   first day of week 1) as a decimal number (01-53).

     %%vv    is equivalent to ``%e-%b-%Y''.

     %%WW    is replaced by the week number of the year (Monday as the first day
	   of the week) as a decimal number (00-53).

     %%ww    is replaced by the weekday (Sunday as the first day of the week) as
	   a decimal number (0-6).

     %%XX    is replaced by national representation of the time.

     %%xx    is replaced by national representation of the date.

     %%YY    is replaced by the year with century as a decimal number.

     %%yy    is replaced by the year without century as a decimal number
	   (00-99).

     %%ZZ    is replaced by the time zone name.

     %%++    is replaced by national representation of the date and time (the

	   format is similar with produced by date(1)).

     %%%%    is replaced by `%'.

SSEEEE AALLSSOO
     date(1),  ctime(3),  printf(1),  printf(3)

SSTTAANNDDAARRDDSS
     The ssttrrffttiimmee() function conforms to ANSI C3.159-1989 (``ANSI C''). The
     `%s' conversion specification is an extension.

BBUUGGSS
     There is no conversion specification for the phase of the moon.

BSD Experimental		 June 4, 1993				     3
